package com.ylr.blog.common.vo.blog_space;

import com.ylr.base.common.jsr303.group.Save;
import com.ylr.base.common.jsr303.group.Update;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-06-07 15:25:27
 * className: BlogSpaceVo
 * version: 1.0
 * description:
 */
@Getter
@Setter
@ToString
public class BlogSpaceVo {

    /**
     * 空间主键
     */
    @NotNull(message = "主键不能为空", groups = Update.class)
    private Long id;

    /**
     * 父级主键
     */
    @NotNull(message = "父级主键不能为空", groups = { Save.class, Update.class })
    private Long parentId;

    /**
     * 父级路径
     */
    @NotBlank(message = "父级路径不能为空", groups = { Save.class, Update.class })
    private String parentPath;

    /**
     * 空间名称
     */
    @NotBlank(message = "空间名称不能为空", groups = { Save.class, Update.class })
    private String name;

    /**
     * 排序等级
     */
    @NotNull(message = "排序等级不能为空", groups = { Save.class, Update.class })
    private Integer sort;

}
